libkovan  1
The kovan standard library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
camera.h
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright 2012 KISS Institute for Practical Robotics *
3  * *
4  * This file is part of libkovan. *
5  * *
6  * libkovan is free software: you can redistribute it and/or modify *
7  * it under the terms of the GNU General Public License as published by *
8  * the Free Software Foundation, either version 2 of the License, or *
9  * (at your option) any later version. *
10  * *
11  * libkovan is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with libkovan. Check the LICENSE file in the project root. *
18  * If not, see <http://www.gnu.org/licenses/>. *
19  **************************************************************************/
20 
21 #ifndef _CAMERA_H_
22 #define _CAMERA_H_
23 
32 #include "geom.h"
33 #include "export.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 typedef struct pixel
40 {
41  int r;
42  int g;
43  int b;
44 } pixel;
45 
47 {
52 };
53 
65 EXPORT_SYM int camera_open(enum Resolution res);
66 
79 EXPORT_SYM int camera_open_device(int number, enum Resolution res);
80 
88 EXPORT_SYM int camera_load_config(const char *name);
89 
95 EXPORT_SYM void set_camera_width(int width);
96 
102 EXPORT_SYM void set_camera_height(int height);
103 
110 EXPORT_SYM int get_camera_width(void);
111 
118 EXPORT_SYM int get_camera_height(void);
119 
125 EXPORT_SYM int camera_update(void);
126 
134 
140 EXPORT_SYM int get_channel_count(void);
141 
149 EXPORT_SYM int get_object_count(int channel);
150 
159 EXPORT_SYM const char *get_object_data(int channel, int object);
160 
165 EXPORT_SYM int get_code_num(int channel, int object);
166 
173 EXPORT_SYM int get_object_data_length(int channel, int object);
174 
180 EXPORT_SYM double get_object_confidence(int channel, int object);
181 
186 EXPORT_SYM int get_object_area(int channel, int object);
187 
192 EXPORT_SYM rectangle get_object_bbox(int channel, int object);
193 
198 EXPORT_SYM point2 get_object_centroid(int channel, int object);
199 
204 EXPORT_SYM point2 get_object_center(int channel, int object);
205 
212 EXPORT_SYM void camera_close();
213 
219 EXPORT_SYM void set_camera_config_base_path(const char *const path);
220 
228 EXPORT_SYM const unsigned char *get_camera_frame_row(unsigned row);
229 
237 EXPORT_SYM const unsigned char *get_camera_frame();
238 
240 
241 #ifdef __cplusplus
242 }
243 #endif
244 
245 
246 #endif
EXPORT_SYM const unsigned char * get_camera_frame()
Definition: camera.h:49
EXPORT_SYM void set_camera_width(int width)
Definition: camera.h:51
EXPORT_SYM int get_camera_width(void)
EXPORT_SYM int get_code_num(int channel, int object)
EXPORT_SYM int get_object_area(int channel, int object)
struct pixel pixel
EXPORT_SYM int get_channel_count(void)
EXPORT_SYM void camera_close()
EXPORT_SYM int get_object_count(int channel)
EXPORT_SYM pixel get_camera_pixel(point2 p)
EXPORT_SYM rectangle get_object_bbox(int channel, int object)
EXPORT_SYM point2 get_object_center(int channel, int object)
EXPORT_SYM double get_object_confidence(int channel, int object)
EXPORT_SYM int get_object_data_length(int channel, int object)
EXPORT_SYM int camera_open_device(int number, enum Resolution res)
EXPORT_SYM int camera_update(void)
Definition: camera.h:48
EXPORT_SYM int camera_open(enum Resolution res)
int r
Definition: camera.h:41
EXPORT_SYM point2 get_object_centroid(int channel, int object)
Definition: geom.h:36
Resolution
Definition: camera.h:46
EXPORT_SYM void set_camera_height(int height)
EXPORT_SYM int camera_load_config(const char *name)
Definition: geom.h:30
EXPORT_SYM unsigned get_camera_element_size()
#define EXPORT_SYM
Definition: export.h:7
Definition: camera.h:39
Definition: camera.h:50
int g
Definition: camera.h:42
EXPORT_SYM void set_camera_config_base_path(const char *const path)
EXPORT_SYM const char * get_object_data(int channel, int object)
EXPORT_SYM const unsigned char * get_camera_frame_row(unsigned row)
int b
Definition: camera.h:43
EXPORT_SYM int get_camera_height(void)